import time
import multiprocessing

def calc_square(arg):
    for n in arg:
        time.sleep(30)
        print ('square is ' + str(n * n))

def calc_cube(arg):
    for n in arg:
        time.sleep(30)
        print ('square is ' + str(n * n * n))

if __name__ == "__main__":
    arg1=[2,3]
    p1 = multiprocessing.Process(target=calc_square,args=(arg1,))
    p2 = multiprocessing.Process(target=calc_cube, args=(arg1,))
    p3 = multiprocessing.Process(target=calc_square, args=(arg1,))
    p4 = multiprocessing.Process(target=calc_square, args=(arg1,))
    p5 = multiprocessing.Process(target=calc_square, args=(arg1,))

    p1.start()
    p2.start()
    p3.start()
    p4.start()
    p5.start()


    p1.join()
    p2.join()
    p3.join()
    p4.join()
    p5.join()

    print ('Done')